package com.victualler.core.config.img.service.impl;

import com.victualler.core.base.service.impl.BaseServiceImpl;
import com.victualler.core.config.img.entity.ImageItemDao;
import com.victualler.core.config.img.dto.ImageGroupDto;
import com.victualler.core.config.img.repository.ImageItemQueryRepository;
import com.victualler.core.config.img.repository.ImageItemRepository;
import com.victualler.core.config.img.service.ImageItemService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: Guoshichang
 * @Date: Create in 11:53 2018/4/6
 * @Discription:
 */
@Service
public class ImageItemServiceImpl extends BaseServiceImpl<ImageItemDao,ImageItemRepository,ImageItemQueryRepository> implements ImageItemService {

    @Override
    public List<ImageGroupDto> getImageGroupList() {
        return this.baseRepository.getFilePathGroup();
    }

    @Override
    public List<ImageItemDao> getByFilePath(String filePath) {
        return this.baseRepository.findByFilePath(filePath);
    }

    @Override
    public List<ImageItemDao> findByImageDirId(Long imageDirId) {
        return this.baseRepository.findByImageDirId(imageDirId);
    }


}
